package com.ayf.payment.boot;

import com.swwx.charm.commons.lang.utils.LogPortal;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author wwl
 * @description:
 * @date 2020/5/28 13:29
 */
@SpringBootApplication
@EnableTransactionManagement
@ServletComponentScan(basePackages = {"com.ayf.payment.game.api.*"})   //filter 注释掉 则不使用
@MapperScan("com.ayf.payment.game.api.mapper")
@ComponentScan(basePackages = {"com.ayf.payment.game.api.*"})
@EnableDubbo
public class Main {

    public static void main(String[] args) {
        (new SpringApplicationBuilder(new Class[]{Main.class})).beanNameGenerator((def, reg) -> {
            return def.getBeanClassName();
        }).run(args);
        LogPortal.info("game-pay-rpc-merchant-api service started", new Object[0]);
    }
}
